package com.wd.good.controller;

import com.wd.good.bean.MyTable;
import com.wd.good.dao.MyTableDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class IndexController {
    @Autowired
    private MyTableDao myTableDao;

    @GetMapping("/index")
    @ResponseBody
    public String index(){
        return "hello";
    }
    @GetMapping("/myTable")
    @ResponseBody
    public MyTable getDate(){
        return myTableDao.getDataByID("1");
    }


}
